package com.xu.factory;
/**
 * 现金收费工厂类
 * @author xudenghui
 * @create 2023-05-17 11:44
 **/
public class CashFactory{

    public static  CashSuper CreateCashAccept(String type){
        CashSuper ca = null;
        switch (type){
            case "正常收费":
                ca = new CashNormal();
                break;
            case "满300返100":
                ca = new CashReturn("300","100");
                break;
            case  "打八折":
                ca = new CashRebate("0.8");
                break;
        }
        return ca;
    }
}
